package com.FactoryMethod.main;

import com.FactoryMethod.animal.Animal;
import com.FactoryMethod.factory.AnimalFactory;
import com.FactoryMethod.factory.impl.CatFactory;
import com.FactoryMethod.factory.impl.DogFactory;

public class Test {
    public static void main(String[] args){
        AnimalFactory animalFactory2 = new DogFactory();
        Animal dog = animalFactory2.getAnimal();
        dog.set();

        AnimalFactory animalFactory1 = new CatFactory();
        Animal cat = animalFactory1.getAnimal();
        cat.set();
    }
}
